Skip to content

Atlas: Fix memory leak from self reference#2678

Merged
einarf merged 1 commit into
developmentfrom
lingering-atlas.ref
May 9, 2025
Merged

Atlas: Fix memory leak from self reference#2678
einarf merged 1 commit into
developmentfrom
lingering-atlas.ref

Conversation

@einarf
Copy link
Copy Markdown
Member

@einarf einarf commented May 9, 2025

Bug description

The DefaultTextureAtlas was self-referencing in the finalizer for textures. This means the atlas will only gc if all the textures are removed from the atlas. This is definitely not reasonable because games will load and cache textures in memory.

The atlas should always die when you lose its reference regardless of it's content.

@einarf einarf merged commit edf7866 into development May 9, 2025
7 checks passed
@einarf einarf deleted the lingering-atlas.ref branch May 9, 2025 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant